package com.jl.card.parse.part.p1p2;

import com.jl.card.JL;
import com.jl.card.parse.IAnalyse;

public class APDUParem implements IAnalyse{

	private byte p2;
	private byte p1;
	private byte ins;
	
	private String res = "";
	public APDUParem(byte ins, byte p1, byte p2) {
		this.ins = ins;
		this.p1 = p1;
		this.p2 = p2;
		analyse();
	}

	@Override
	public String getSummary() {
		return res;
	}

	@Override
	public void analyse() {
		switch (ins) {
		case JL.INS_SELECT_FILE:
			this.res = ParamTool.getSelectDescript(p1, p2);
			break;
		case JL.INS_READ_BINARY:
		case JL.INS_UPDATE_BINARY:
			this.res = ParamTool.getReadOrUpdateBinaryDescript(p1, p2);
			break;
		case JL.INS_READ_RECORD:
		case JL.INS_UPDATE_RECORD:
			this.res = ParamTool.getReadOrUpdateRecordDescript(p1,p2);
		default:
			break;
		}
	}
	
	
	
}
